

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title:{
      type: String,
      default: ""
    },
    dataInfo:{
      type: Object,
      default: () => ({})
    },
    chartId: {
      type: String,
      value: 'chart-group-line'
    },
    canvasId: {
      type: String,
      value: 'canvas-group-line'
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    noticeInfo:[],
    chartData:{},
    resultInfo:[],
    resultStatus:""
  },

  /**
   * 组件的方法列表
   */
  methods: {

  },

  observers:{
    'dataInfo':function(valInfo){
      let { noticeInfo, resultInfo, resultStatus, chartData} = valInfo
      if(noticeInfo){
        this.setData({
          noticeInfo
        })
      }
      if(chartData){
        this.setData({
          chartData
        })
      }
      if(resultInfo && resultInfo.length){
        this.setData({
          resultInfo, 
          resultStatus
        })
      }

    }
  }
})
